<?php self::link_script('jquery.tools.min'); ?>
<?php self::link_script('jquery.form'); ?>

<?php self::link_pss('new_v5/be'); ?>
<?php self::link_pss('new_v5/my_nav'); ?>
<?php self::link_pss('new_v5/email'); ?>
<?php self::link_pss('new_v5/resume'); ?>
<?php self::link_pss('new_v5/common'); ?>
<?php self::link_pss('new_v5/layer'); ?>
<?php self::link_pss('new_v5/jobsearch'); ?>
<?php self::link_pss('new_v5/dialog'); ?>

<?php self::include_block('my/main_nav'); ?>
<?php self::include_block('my/guild'); ?>
<div class="emailAll">
    <div class="emailAll_1">
        <div class="email_body">
            <?php self::include_block('my/resume_left'); ?>
            <div class="email_right">
                <div class="email_main">
                    <div class="email_title">
                        <div class="email_title_left">
                            <div class="resumes_title_button" id="new_letter" rel="#letter-dialog">
                                <div class="resumestips_1"></div>
                                <a href="javascript:void(0);">创建新求职信</a>
                            </div>
                            共可创建<?php echo letter_service::number_limit ?>份，还可创建<span id="remainCount"><?php echo letter_service::remained_letter() ?></span>份求职信。<span class="msg_hint">&nbsp;</span>
                        </div>
                    </div> 
                    <div class="email_list">
                        <div class="list_title">
                            <div class="email4 tab1">修改日期</div>
                            <div class="email4 job_tab2">求职信名称</div>
                            <div class="email4 job_tab3">修改</div>
                            <div class="email4 job_tab3">预览</div>
                            <div class="email4 job_tab3">复制</div>
                            <div class="email4 job_tab4">删除</div>
                        </div>
                        <?php if ($letters === null): ?>
                            <div style="text-align:center;" class="emailL_tab emailL_tab_bgcolor">您目前还没有创建求职信</div>
                        <?php else: ?>
                            <?php foreach ($letters as $key => $letter): ?>
                                <div class="emailL_tab emailL_tab_bgcolor grandfather">
                                    <div class="email5 tab9">2012-9-20</div>
                                    <div class="email5 job_tab10">
                                        <a title="<?php echo $letter->title; ?>" href="javascript:void(0);"><?php echo $letter->title; ?></a>
                                    </div>
                                    <div class="email5 job_tab11">
                                        <a href="javascript:void(0);" rel="#letter-dialog" class="edit_letter resumesIcon iconHover_2"></a>
                                    </div>
                                    <div class="email5 job_tab11">
                                        <a href="javascript:void(0);" rel="#preview-letter-dialog" class="preview_letter resumesIcon iconHover_3"></a>
                                    </div>
                                    <div class="email5 job_tab11">
                                        <a href="javascript:void(0);" class="letter_copytoo resumesIcon iconHover_4"></a>
                                    </div>
                                    <div class="email5 job_tab12">
                                        <a href="javascript:void(0);" rel="#del-letter-dialog" class="remove_letter resumesIcon iconHover_5"></a>
                                    </div>
                                    <input type="hidden" name="id" value="<?php echo $letter->id ?>" />
                                    <?php self::csrf_field('user'); ?>
                                </div>
                            <?php endforeach; ?>
                        <?php endif; ?>
                        <div class="email_button"></div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<!--编辑dialog-->
<div id="letter-dialog" style="display: none; width: 600px;">
    <div style="position: absolute; z-index: 9999; left: 300px; top: 193.5px;" id="ajaxLoading"><img src="http://myimg.zhaopin.com/images/new_v3/ani_ajaxload.gif"></div>
</div>

<!--删除dialog-->
<div id="del-letter-dialog" style="display: none; width: 420px;">
    <div style="position: absolute; z-index: 9999; left: 210px; top: 57px;" id="ajaxLoading"><img src="http://myimg.zhaopin.com/images/new_v3/ani_ajaxload.gif"></div>
</div>

<!--预览dialog-->
<div id="preview-letter-dialog" style="display: none; width: 620px;">
    <div style="position: absolute; z-index: 9999; left: 210px; top: 57px;" id="ajaxLoading"><img src="http://myimg.zhaopin.com/images/new_v3/ani_ajaxload.gif"></div>
</div>